from django.db import migrations, models
import django.contrib.auth.models
import django.contrib.auth.validators
import django.utils.timezone

class Migration(migrations.Migration):
    initial = True

    dependencies = [
        ('auth', '__first__'),
    ]

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('password', models.CharField(max_length=128, verbose_name='密码')),
                ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='最后登录')),
                ('is_superuser', models.BooleanField(default=False, verbose_name='超级用户状态')),
                ('username', models.CharField(
                    max_length=150,
                    unique=True,
                    validators=[django.contrib.auth.validators.UnicodeUsernameValidator()],
                    verbose_name='用户名'
                )),
                ('first_name', models.CharField(blank=True, max_length=150, verbose_name='名字')),
                ('last_name', models.CharField(blank=True, max_length=150, verbose_name='姓氏')),
                ('is_staff', models.BooleanField(default=False, verbose_name='职员状态')),
                ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='加入时间')),
                ('email', models.EmailField(max_length=254, unique=True, verbose_name='邮箱')),
                ('phone', models.CharField(max_length=11, unique=True, verbose_name='手机号')),
                ('identity', models.CharField(
                    choices=[
                        ('enterprise', '企业单位'),
                        ('research', '科研院所'),
                        ('government', '政府机关')
                    ],
                    default='enterprise',
                    max_length=20,
                    verbose_name='身份类型'
                )),
                ('is_active', models.BooleanField(default=True, verbose_name='是否激活')),
                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('groups', models.ManyToManyField(
                    blank=True,
                    related_name='user_set',
                    related_query_name='user',
                    to='auth.group',
                    verbose_name='用户组'
                )),
                ('user_permissions', models.ManyToManyField(
                    blank=True,
                    related_name='user_set',
                    related_query_name='user',
                    to='auth.permission',
                    verbose_name='用户权限'
                )),
            ],
            options={
                'verbose_name': '用户',
                'verbose_name_plural': '用户',
                'db_table': 'users',
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
    ]
